package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IGoodProductEvaluateFragmentModel;
import com.wgts.wgts.mvp.model.imp.GoodProductEvaluateFragmentModel;
import com.wgts.wgts.mvp.presenter.IGoodProductEvaluateFragmentPersenter;
import com.wgts.wgts.mvp.presenter.imp.GoodProductEvaluateFragmentPersenter;
import com.wgts.wgts.mvp.view.IGoodProductEvaluateFragmentView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class GoodProductEvaluateFragmentModule {

    private IGoodProductEvaluateFragmentView view;

    public GoodProductEvaluateFragmentModule(IGoodProductEvaluateFragmentView view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public IGoodProductEvaluateFragmentView provideView(){
        return view;
    }

    @FragmentScope
    @Provides
    public IGoodProductEvaluateFragmentModel provideModel(NetService netService){
        return new GoodProductEvaluateFragmentModel(netService);
    }

    @FragmentScope
    @Provides
    public IGoodProductEvaluateFragmentPersenter providePersenter(IGoodProductEvaluateFragmentView view, IGoodProductEvaluateFragmentModel model){
        return new GoodProductEvaluateFragmentPersenter(model, view);
    }
}
